-
Notifications
You must be signed in to change notification settings - Fork 775
Clarify layer ordering #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@opencontainers/image-spec-maintainers PTAL (and @AaronLehman too, please :-) |
config.md
Outdated
| - **diff_ids** *array*, REQUIRED | ||
|
|
||
| An array of layer content hashes (`DiffIDs`), in order from bottom-most to top-most. | ||
| An array of layer content hashes (`DiffIDs`), in stack order from bottom-most to top-most (i.e. from diff_ids[0] to diff_ids[len(diff_ids)]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“diff_ids[0] to diff_ids[len(diff_ids)]” → “diff_ids[0] to diff_ids[len(diff_ids)]”.
manifest.md
Outdated
| The second goal is to allow multi-architecture images, through a "fat manifest" which references image manifests for platform-specific versions of an image. | ||
| The third goal is to be translatable to the [OpenContainers/runtime-spec](https://github.com/opencontainers/runtime-spec) | ||
|
|
||
| This section defines the `application/vnd.oci.image.manifest.list.v1+json` and `application/vnd.oci.image.manifest.v1+json` [media type](media-types.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we break this up into two files? Manifest lists and manifests seem as separate as manifests and configs. And while I like the commits that clearly list the media types being defined, I think that change is orthogonal to the order-clarification. Maybe it belongs in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK, but separate PR.
manifest.md
Outdated
| Subsequent layers MUST then follow in the order in which they are to be layered on top of each other. | ||
| The algorithm to create the final unpacked filesystem layout MUST be to first unpack the layer at index 0, then index 1, and so on. | ||
| Subsequent layers MUST then follow in stack order. | ||
| The final filesystem layout MUST be from [applying](layer.md#applying) the layers in stack order (i.e. from layers[0] to layers[len(layers)]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we need to specify something about the initial state before the layers are applied (#318). I also changed “be” to “match” in that PR to allow for implementations like union mounting.
Also backticks around the layers[…] stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but lets leave this for #318
image-layout.md
Outdated
| Tooling can: | ||
| * convert a given ref into a runnable OCI Image Format by finding an appropriate manifest from the manifest list | ||
| * apply the [filesystem layers](layer.md) per the [manifest layers ordering](manifest.md#image-manifest-property-descriptions) | ||
| * convert the image configuration into an [OCI Runtime config.json](https://github.com/opencontainers/runtime-spec) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these steps are required to create a runable bundle. How about:
Given an image layout and a ref, a tool can create an OCI Runtime Specification bundle by:
- Following the ref to find a manifest, possibly via a manifest list,
- Unpacking the filesystem layers in the correct order, and
- Converting the image configuration into an OCI Runtime Specification
config.json.
[edit: “… a runnable OCI Runtime…” → “… an OCI Runtime…”.]
philips
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
manifest.md
Outdated
| The second goal is to allow multi-architecture images, through a "fat manifest" which references image manifests for platform-specific versions of an image. | ||
| The third goal is to be translatable to the [OpenContainers/runtime-spec](https://github.com/opencontainers/runtime-spec) | ||
|
|
||
| This section defines the `application/vnd.oci.image.manifest.list.v1+json` and `application/vnd.oci.image.manifest.v1+json` [media type](media-types.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK, but separate PR.
manifest.md
Outdated
| Subsequent layers MUST then follow in the order in which they are to be layered on top of each other. | ||
| The algorithm to create the final unpacked filesystem layout MUST be to first unpack the layer at index 0, then index 1, and so on. | ||
| Subsequent layers MUST then follow in stack order. | ||
| The final filesystem layout MUST be from [applying](layer.md#applying) the layers in stack order (i.e. from layers[0] to layers[len(layers)]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but lets leave this for #318
|
I see that #318 removes that line, but not how it clarifies anything. What On Thu, Sep 29, 2016, 23:08 Brandon Philips [email protected]
|
|
@vbatts don't worry about #318. The language in #318 is "+ The root filesystem MUST match the result of applying the entries to an empty directory in the listed order." I think this is a good suggestion for this PR: #349 (comment) |
|
On Thu, Sep 29, 2016 at 02:31:15PM -0700, Vincent Batts wrote:
#318 forbids seeding the unpack directory location with any content |
2aa1478 to
d4220e4
Compare
|
updated |
layer.md
Outdated
|
|
||
| This document describes how to serialize a filesystem and filesystem changes like removed files into a blob called a layer. | ||
| One or more layers are ordered on top of each other to create a complete filesystem. | ||
| One or more layers changesets are applied on top of each other to create a complete filesystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "changesets"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
config.md
Outdated
| - **diff_ids** *array*, REQUIRED | ||
|
|
||
| An array of layer content hashes (`DiffIDs`), in order from bottom-most to top-most. | ||
| An array of layer content hashes (`DiffIDs`), in stack order from bottom-most to top-most (i.e. from `diff_ids[0]` to `diff_ids[len(diff_ids)]`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't like introducing the word "stack" because it addles my poor brain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k. I'll just switch from the whole bottom to top, since we're not pushing and popping this list anyways.
image-layout.md
Outdated
| Given an image layout and a ref, a tool can create an [OCI Runtime Specification bundle](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/bundle.md) by: | ||
|
|
||
| * Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest.md#manifest-list) | ||
| * Apply the filesystem layers in the specified order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
config.md
Outdated
| An *Image* is an ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime. | ||
| This specification outlines the JSON format describing images for use with a container runtime and execution tool and its relationship to filesystem changesets, described in [Layers](layer.md). | ||
|
|
||
| This section defines the `application/vnd.oci.image.config.v1+json` [media type](media-types.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate these but would also say a different PR..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k
Because stacks Signed-off-by: Vincent Batts <[email protected]>
Signed-off-by: Vincent Batts <[email protected]>
where as the data structures pointing to these chagesets can control their own ordering. Signed-off-by: Vincent Batts <[email protected]>
This long sentence is more clear as a list Signed-off-by: Vincent Batts <[email protected]>
d4220e4 to
52f5d46
Compare
|
updated PTAL |
| Given an image layout and a ref, a tool can create an [OCI Runtime Specification bundle](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/bundle.md) by: | ||
|
|
||
| * Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest.md#manifest-list) | ||
| * Applying the filesystem layers in the specified order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make “Applying the filesystem layers” a link to layers.go#applying?
|
|
||
| * Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest.md#manifest-list) | ||
| * Applying the filesystem layers in the specified order | ||
| * Converting the [image configuration](config.md) into an [OCI Runtime Specification config.json](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc2/config.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backticks around config.json?
…ectory Point out that the layer's initial empty directory has unspecified attributes. Layer authors interested in the ownership and other attributes of the unpacked root directory should explicitly set an entry for it. This commit originally focused on requiring the initial directory to be empty before the layers are unpacked into it. But most of that was picked up in fed7241 (manifest: clarify the order of layers, 2016-09-29, opencontainers#349). I'd recommended "match" instead of "be" to allow folks to apply via a union filesystem or whatever. As long as the finished product is right, compliance testers and users should be satisfied. Signed-off-by: W. Trevor King <[email protected]>
…ectory Point out that the layer's initial empty directory has unspecified attributes. Layer authors interested in the ownership and other attributes of the unpacked root directory should explicitly set an entry for it. This commit originally focused on requiring the initial directory to be empty before the layers are unpacked into it. But most of that was picked up in fed7241 (manifest: clarify the order of layers, 2016-09-29, opencontainers#349). I'd recommended "match" instead of "be" to allow folks to apply via a union filesystem or whatever. As long as the finished product is right, compliance testers and users should be satisfied. Signed-off-by: W. Trevor King <[email protected]>
…ectory Point out that the layer's initial empty directory has unspecified attributes. Layer authors interested in the ownership and other attributes of the unpacked root directory should explicitly set an entry for it. This commit originally focused on requiring the initial directory to be empty before the layers are unpacked into it. But most of that was picked up in fed7241 (manifest: clarify the order of layers, 2016-09-29, opencontainers#349). I'd recommended "match" instead of "be" to allow folks to apply via a union filesystem or whatever. As long as the finished product is right, compliance testers and users should be satisfied. Signed-off-by: W. Trevor King <[email protected]>
…ectory Point out that the layer's initial empty directory has unspecified attributes. Layer authors interested in the ownership and other attributes of the unpacked root directory should explicitly set an entry for it. This commit originally focused on requiring the initial directory to be empty before the layers are unpacked into it. But most of that was picked up in fed7241 (manifest: clarify the order of layers, 2016-09-29, opencontainers#349). I'd recommended "match" instead of "be" to allow folks to apply via a union filesystem or whatever. As long as the finished product is right, compliance testers and users should be satisfied. Signed-off-by: W. Trevor King <[email protected]>
This series of commits touches on the places that ordering is applied/unpacked.
Attempting to have consistent wording.
Fixes #276